import { createApp } from 'vue'
import App from '@/App.vue'
import { registerDirective } from './directives'
import { registerRouter } from './router'
import { registerPinia } from './store'
import { registerElementPlus } from './plugins/element';
import './styles/global.scss';
import { registerEcharts } from './plugins/echarts'

const app = createApp(App)

registerRouter(app);  // 全局注册路由对象
registerDirective(app);  // 注册全局自定义指令
registerPinia(app); // 全局注册状态机Pinia
registerElementPlus(app);  // 全局注册ElementPlus以及相关配置
registerEcharts(app);  // 全局注册Echarts

app.mount('#app');
